<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>

<div class="app">App</div>

<script>
  // this.a = 1

  // dsafadsf

  // this.a = 2

  // render()

  console.log(1)

  nextTick(() => {
    console.log(2)
  })

  console.log(3)

  function nextTick(callback) {
    if (Promise) {
      new Promise(resolve => {
        resolve()
      }).then(() => {
        callback()
      })
    } else {
      setTimeout(callback)
    }
  }

  /*
  * try {
  *
  * } catch (Exception e) {
  *
  * } finally {
  *
  * }
  *
  *
  * */
  // this.loading = true
  // axios.get("http://www.baidu.com").then(ret => {
  //
  // }).catch(err => {
  //
  // }).finally(() => {
  //    this.loading = false
  // })
  // Promise  p1  pending, [full_filled, reject]
</script>
</body>
</html>